<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>修改签名 - {:config('web.WEB_TIT')}</title>
	{include file="member/public"}
</head>
<body>
	<header data-am-widget="header" class="am-header am-header-default jz">
		  <div class="am-header-left am-header-nav">
			 <a href="javascript:history.back()" class="">
				<i class="am-icon-chevron-left"></i>
			</a>
		  </div>
		  <h1 class="am-header-title">
			  <a href="#title-link" class="">我的个性签名</a>
		  </h1>
	</header>
	<textarea class="ts" id="description" placeholder="随便写些什么刷下存在感">{$member.description}</textarea>
	<input type="hidden" name="__token__" id="token" value="{$Request.token}" />
	<div class="shure" id="submit">
		<a href="">确认修改</a>
	</div>
	<script type="text/javascript">
        $('#submit').click(function(){
            var description = $('#description').val();
            if(description.length > 65){
                alert('签名字数最多65字数');
                return false;
            }
            $.ajax({
                type: 'POST',
                url: "{:url('member/set_autograph')}",
                data:{description:description,token:$('#token').val()},
                dataType:'json',
                success: function(data){
                    if(data.code == 200){
                        alert(data.msg)
                        window.location.href = "{:url('member/set')}";
                    }else{
                        alert(data.msg)
                        location.reload(true);
                    }
                },
            });
        });
	</script>
</body>
</html>
